<#assign url="${base}/">
 <#if (categoryId)??>
  <#assign url="${url}"+"cate--${categoryId}"+"/">	        	        
 </#if>
 <#if (keyWord)??>
  <#assign url="${url}"+"wd--${keyWord}"+"/">
 </#if>
 <#if (filterStr)??>
   <#if (filterStr?last_index_of("__sort")!=-1)>
     <#assign length=filterStr?last_index_of("__sort")>
     <#assign url="${url}"+"${filterStr?substring(0,length)}">
    <#else>
     <#assign url="${url}"+"${filterStr}">
   </#if>
 </#if>
<script type="text/javascript">
  var url="${url}";
  var $keyWord="${keyWord?default("")}";
  var $categoryId="${categoryId?default("")}";
  var getMore=function($type){
     var params={};
     if($keyWord!=""){
       params.keyWord=$keyWord;
     }
     if($categoryId!=""){
       params.categoryId=$categoryId;
     }
     $.ajax({
	    url:"${base}/more/"+$type+"/go",
	    type:"POST",
	    data:params,
	    global:false,
	    success:function(msg){
	     var $msg=$(msg);
         $.blockUI({
		  message : $msg,
		  css : {
			"width" : "625px",
			"height" : "320px",
			"cursor" : 'default',
			"textAlign" : "left",
			"border" : "none",
			"border-radius" : "10px"
		  }
	    });
	    $msg.find("span#close,input[name='close']").click(function() {
			$.unblockUI();
	    });
	  }
	 });
  }
  $(function(){
    $(".more").each(function(){
      var $this=$(this);
      var $type=$this.attr("data-type");
      $this.click(function(){
        getMore($type);
      });     
    });
  });
</script>
<div class="floatl">
		<div class="menu2">
	    	<h1 class="menu_title">Category Matches</h1>
	        <div class="catelog_shaixuan">
	        	<ul>
	            	<li>
						<#if (categories?exists&&categories?size>6)>
						 <ul>
	                        <#assign n=6>
						    <#if n!=0>
							   <#list 0..(n-1) as i>
							   	 <#assign cate=categories[i]>
							    <#if (keyWord)??>
								 <li><a href="${base}/cate--${cate.id}/wd--${keyWord?default("")}">${cate.title}</a></li>
								<#else>
								 <li><a href="${base}/cate--${cate.id}">${cate.title}</a></li>
								</#if>
							   </#list>
							</#if>
						 </ul>
						  <div><a  data-type="categoryId" href="javascript:void(0);"  class="more gray999">more...</a></div>
						<#else>
	                     <ul>
						   <#list categories as cate>
							 <#if (keyWord)??>
									 <li><a href="${base}/cate--${cate.id}/wd--${keyWord?default("")}">${cate.title}</a></li>
									<#else>
									 <li><a href="${base}/cate--${cate.id}">${cate.title}</a></li>
							 </#if>
						   </#list>
						 </ul>
	                    </#if>
					</li>
	            </ul>
	        </div>
	    </div>
    <!--end:menu-->
    <div class="menu2">
       <form >
    	<h1 class="menu_title">By Keywords</h1>
        <div class="catelog_shaixuan">
        	<ul>
            	<li><input type="text" class="text02" name="leftKeyWord"/><input type="button" value="Go" class="btn_go" name="btnKeyWord"></li>
            </ul>
        </div>
       </form>
    </div>
    <!--end:menu-->
    <#if (sources?exists&&sources?size!=0)>
		<div class="menu2">
	    	<h1 class="menu_title">By Seller</h1>
	        <div class="catelog_shaixuan">
	        	<ul>
	            	<#list sources as source>
		        	    <li><a href="${url}__filterSource--${source}/go">${source}</a><#if (source==filterSource?default(""))>   
		        	     <a href="${url}" class="gray999">remove</a></#if>
		        	    </li>            	  
		        	</#list>
	            </ul>
	        </div>
	    </div>
    </#if>
    <!--end:menu-->
	    <div class="menu2">
	    	<h1 class="menu_title">By Brand</h1>
	        <div class="catelog_shaixuan">
	            <#if (tags?exists&&tags?size>6)>
					<ul>
					   <#assign n=6>
					    <#if n!=0>
						   <#list 0..(n-1) as i>
						   	 <#assign tag=tags[i]>
						     <li><a href="${url}__filterTag--${tag}/go">${tag}</a></li>					      
						   </#list>
                        </#if>
					</ul>
                    <div><a data-type="tag" href="javascript:void(0);"  class="more gray999">more...</a></div>
                   <#else>
                     <ul>
					   <#list tags as tag>
						  <li><a href="${url}__filterTag--${tag}/go">${tag}</a></li>
					   </#list>
					 </ul>
	             </#if>
	        </div>
	    </div>
   <!--end:menu-->
   <#if (terms?exists&&terms?size!=0)>
	   <div class="menu2">
	    	<h1 class="menu_title">Related Searches</h1>
	        <div class="catelog_shaixuan">
	        	<ul>
	            	<#list terms as term>
	            	  <li><a href="${base}/wd--${term}">${term}</a></li>            	  
	            	</#list>
	            </ul>
	        </div>
	    </div>
    </#if>
   <!--end:menu-->
</div>